
import requests
from bs4 import BeautifulSoup


url = 'https://36kr.com/information/web_news'

header = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.90 Safari/537.36'
}


strhtml = requests.get(url, headers=header)

soup = BeautifulSoup(strhtml.text, 'lxml')
# print(soup)
data = soup.select('#app > div > div.kr-layout-main.clearfloat > div.main-right > div.kr-layout-content > div > div.kr-information-left > div > div > div.information-flow-list > div > div.kr-flow-article-item > div > div.kr-shadow-content > div.article-item-info.clearfloat > p > a')

# print(data)
for item in data:
    result = {
        'title': item.get_text(),
        'link': ('https://36kr.com' + item.get('href'))
    }
    print(result)







